import * as mongoose from 'mongoose';
import db from '../lib/db/mongodb';

//客户拜访频次设定=======新需求2018-12-30
let visitFrequencySchema:mongoose.Schema=new mongoose.Schema({
    consumerCode:String,//客户编码
    visitSetCount:Number,//设定的拜访频次
    userId:String,//员工id
    unit:Number, //单位 1:周  2:月
    visitedCount:Number,//员工已经拜访的次数
    month:String,
    year:String,
    setTime:String
},{collection:'visitFrequency'});
export interface VisitFrequency extends mongoose.Document{
    consumerCode:string;
    visitSetCount:number;
    userId:string;
    unit:number;
    visitedCount:number;
    month:string;
    year:string;
    setTime:string;
}
let visitFrequencyModel=db.model<VisitFrequency>('visitFrequency',visitFrequencySchema);
export default visitFrequencyModel;
